package com.ymm.lulutong.constant;

import lombok.Getter;

/**
 * @Description: 统一返回结果状态信息类
 * @author: Xuecheng Li
 * @CreateTime: 2022-08-03  10:10
 * @Version: 1.0
 */
@Getter
public enum ResultCodeEnum {

    //成功
    SUCCESS(200, "成功"),
    //失败
    FAIL(201, "失败"),
    //输入参数不正确
    PARAM_ERROR(202, "输入参数不正确"),
    //传入参数为空
    PARAMETER_NULL_ERROR(203, "传入参数错误"),
    //系统繁忙，请稍后重试！
    SERVICE_ERROR(204, "系统繁忙，请稍后重试！"),
    //数据库操作错误
    DATABASE_ERROR(205, "数据库操作错误"),
    //验证码错误
    CODE_ERROR(206, "验证码错误"),
    //页面记录数过大
    PAGESIZE_TOO_LARGE(207, "页面记录数过大"),
    //返回数据过多
    RETURN_DATA_TOO_MANY(208, "返回数据过多"),
    //Redis错误
    REDIS_ERROR(209, "Redis错误");

    private Integer code;
    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
